home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX Development Foundation 1.1 for IRIX 6.2
/
SGI IRIX 6.2 Development Foundation 1.1.iso
/
dist
/
patchSG0001645.idb
/
usr
/
include
/
rtlock.h.z
/
rtlock.h
Wrap
C/C++ Source or Header
|
1997-07-01
|
2KB
|
52 lines
/**************************************************************************
* *
* Copyright (C) 1996 Silicon Graphics, Inc. *
* *
* These coded instructions, statements, and computer programs contain *
* unpublished proprietary information of Silicon Graphics, Inc., and *
* are protected by Federal copyright law. They may not be disclosed *
* to third parties or copied or duplicated in any form, in whole or *
* in part, without the prior written consent of Silicon Graphics, Inc. *
* *
**************************************************************************/
#ifndef __RTLOCK_H__
#define __RTLOCK_H__
#ifdef __cplusplus
extern "C" {
#endif
#include "sgidefs.h"
typedef struct rtlock_s {
union {
unsigned long long rt_data;
struct {
unsigned short owner;
unsigned short waiters;
unsigned int reserved;
} rt_datafield;
} rt_state;
unsigned int rt_spins;
} rtlock_t;
#define rt__Owner rt_state.rt_datafield.owner
#define rt__Waiters rt_state.rt_datafield.waiters
#define RTLOCK_DEFAULT_SPINS 600
#if _SGIAPI
extern int rtlock_init(rtlock_t *, unsigned int);
extern int rtlock_acquire(rtlock_t *);
extern int rtlock_release(rtlock_t *);
extern int __rtlock_init(rtlock_t *, unsigned int);
extern int __rtlock_acquire(rtlock_t *);
extern int __rtlock_release(rtlock_t *);
#endif /* _SGIAPI */
#ifdef __cplusplus
}
#endif
#endif /* __RTLOCK_H__ */